import request from '@/utils/request'

export function getList(params) {
  return request({
    url: '/user/getList',
    method: 'get',
    params
  })
}
export function getRechargeList(params) {
  return request({
    url: '/user/getRechargeList',
    method: 'get',
    params
  })
}

export function getTotalRecharge(params) {
  return request({
    url: '/user/getTotalRecharge',
    method: 'get',
    params
  })
}

export function getUserDetail() {
  return request({
    url: '/user/getUserDetail',
    method: 'get'
  })
}

export function updateAccount(data) {
  return request({
    url: '/user/updateAccount',
    method: 'put',
    data
  })
}

export function addTestAccount(params) {
  return request({
    url: '/user/addTestAccount',
    method: 'get',
    params
  })
}

export function getTestAccount() {
  return request({
    url: '/user/getTestAccount',
    method: 'get'
  })
}

export function disable(data) {
  return request({
    url: '/user/disable',
    method: 'post',
    data
  })
}
export function unDisable(id) {
  return request({
    url: `/user/unDisable/${id}`,
    method: 'put'
  })
}

export function updateBalance(data) {
  return request({
    url: '/user/updateBalance',
    method: 'put',
    data
  })
}

export function updateProfit(data) {
  return request({
    url: '/user/updateProfit',
    method: 'put',
    data
  })
}
